function editDlg(){
    $("#updateDlg").modal();
    var rowid = $table.getGridParam("selrow");
    var rowData = $table.jqGrid("getRowData",rowid);
    $("#update_rpId").val(rowData.rpId).attr('readonly',true);
    $("#update_rpName").val(rowData.rpName);
    $("#update_rpRequir").val(rowData.rpRequir);
    $("#update_rpConclu").val(rowData.rpConclu);
    $("#update_rpRelationship").val(rowData.rpRelationship);
    $("#update_rpConditions").val(rowData.rpConditions);
}
$("#update_button").click(function(){
    var form_data=$("#form_update").serialize();
    var d_data=decodeURIComponent(form_data,true);
    var userdata=DataDeal.formToJson(d_data);
    $.ajax({
        type: "post",
        url: "/pattern/update",
        contentType: "application/json;charset=utf-8",
        data: userdata,
        success: function (data) {
            layer.msg(data);
            reload();
            $('#updateDlg').modal('hide').on("hidden", function () {
                $(this).removeData("modal");
            });
            document.getElementById("form_update").reset();//重置表单
        }
    });
});